<!doctype html>
<html lang="en">

	<head>
		<meta charset="utf-8">
		<title>data demo</title>
		<style>
			div {
				color: blue;
			}
			
			span {
				color: red;
			}
		</style>

		<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
	</head>

	<body>

		<div>
			The values stored were
			<span></span> and
			<span></span>
		</div>

		<script>
			$("div").data("test", {
				first: 16,
				last: "pizza!"
			});
			$("span:first").text($("div").data("test").first);
			$("span:last").text($("div").data("test").last);
		</script>

	</body>

</html>